refactor(handlers): cleanup code, add request logging