formatted code, wrote some javadoc, deleted unused class