Major refactoring... maybe I will make a game out of this? :P