Added 404 response when request is not handled.
Support functions for testing. Pass regex matches to callback. Pass result of test function to callback.