Bugfixes
minor TODO cleanup