Tidied up code some more and added in another test