tiny bugfixes and traces of cleanup