Add javadocs, comments and format the rest

-Add javaDocs, comments, optimize imports, format the
rest of the code in all other activities.