Code and comments refactor