Refactoring to have a more consistent coding style