More model cleanup and optimizations.