brb, refactoring the whole thing. Soon!