Some fixes for one file

This is just a preliminary look at the kind of cleanup I'd expect to need to happen for the whole framework.