Added a few more unit tests - Tidied up code for submission