move saving team stuff to server file; filter valid commands