Added team db caching and user relations, added update script, added simple tests