Some more small refactoring for better solubility