cleaned up loading team function, reducing replication, still needs a little more cleanup