Added some javadocs and TODOs