Cleaned up some. Less mutability.
Boiled away some of the boilerplate