added javadoc
Style fixes