Added exceptions and the RequestHandler

Added exceptions and the RequestHandler