Refactors team edition into modal