Marginally cleaned up the crazily obfuscated quest code.