Fixed the issue where records where attached to player IDs instead of team assignment IDs.
Cleaned up the SQL and column references (somewhat).