adding javadocs and comments, deleting unused methods