Refactor indentation and comments