Altered fast 404 include for use in settings.php so it works with the rest of the module as it stands.
Refactored a bunch of the module code so it can be loaded directly from settings.php
without having to boot the kernel.