Yet another refactoring