final tweaks, added javadoc comments