Updated the code to meet the standards

Changed the code indentation, added javadoc format comments.