Fixed wrong exception message
Refactored routing to use a class and autoloading