Refactor

Small refactoring to keep the code consistent.