Few refactoring bits after cindyli pull request comments