refactoring: typos, formatting, visibility