Code refactoring, again