Lots of code cleanups to nicely incorporate polymorphic lenses.