Fixed some TODOS + added a part of javadoc