Tidying up, Javadoc, unit tests