added a plethora of Javadoc, and some TODOs