Just tidied up the code a little.