Make Context struct into a class
Install custom error handler