Overall restructuring and refactoring (mainly renaming).