Further refactoring for simplicity