Refactoring for simplification and consistency