more code cleanup, added documentation and Javadoc output directory