a rew more small refactors (master)