Moved all external libraries into lib
Improved exception handling.
Added HTML pages for errors.