Refactoring handlers to push logic into Team