small series of refactors