refactor(misc): style cleanup and refactoring