Some more documentation. Connected some pending events. Added a couple of todos.