Added optional mesh and scene optimization switches.