Use events for handling parsing of request
Code cleanup