a bunch of refactoring as I look at things and see better ways of doing
them