Refactoring to better follow code conventions