code style fixes and completing javadoc