Refactor tea into its own plugin