Implemented Handlers function to replace all middleware

closes #62