Refactoring with constants