Some code style refactoring