added some Javadoc and comments, also removed a few autogenerated todo comments