Some more refactors