Cleaned up some code and added some javadoc

There was a ton of leftover comments (not functional comments; unused code). I removed that and added some javadoc.