created classes for the team tables.

and changed the sql to match the prof hammans format