Small fixes, TODO's, javadoc