Foreign key classes

Issue #37
 - Split the foreign key class into three separate classes