Spaghooti refactoring
wtf?