Refactor ftw