Refactoring, code simplification