clean up & bugfixes