minor refactoring: renames and formatting