some renaming and cleanup