Code cleanup request handler
Simplifying request handler code