Mavenize project.
Fix potential resource leak.
Add todos.