did a QAPlug analysis and improved code quality
added some javadoc