Even more refactors (I'm not happy yet)