Finished preliminary table stuff

This is by no means a finalized, domains are not done and i might have
missed some. everyone should go over the primary and foreign keys and
make sure they are right