Changed properties for foreign keys

Corrected code to call foreign keys from other classes.