First chunk of refactoring

Hide the cruft