Added JUnit to tests, Refactored classed to keep code tidy, added licence to classes