Convert class to a singleton.
Added handler registration.
Added option for a PSR compatible logger.
Remove default error page in favour of a callback (so that the app itself can handle it).