Arrrgh, refactor...arrrsgh