Coding refactor