Further refactoring