some renaming and bugfixing