Various fixes, changes, and improvements. Still need to finish fixing SMOF, oy.