Javadoc comments and a few TODOs added.