Tidied it up a bit