Refactor RequestHandler