Model code cleanups