Adding some JavaDoc, cleaning up some warnings