Correcting formatting, adding javadocs