zomgz refactorzzzzz might be quasi done! w00t!