Tidied up code and pom