minor bugfixes + morecleanup