Tidied up the code as one does.