changed system out to err for error cases
Cleaned up RequestHandler