Add TeamManager and fix EntitySystem