added foreign keys, renamed uid
some more foreign keys