Formatting changes and a few fixes.
Model tests are passing.