Zomg refactor