Also tidied error output. Still could be tidied quite a lot but I am still considering how best to go about it.