Cleanup, added Javadoc.