Added JavaDocs and comments for things that need fixing