So much refactoring...