Lots of refactors D: