Did some refactoring.
Added a todo.