Refactor team editor

See #85