Refactor code, rebased?
Fix foreign key bugs.
Fix spalling mistake.
Fix deprecated eager loading code.
Merge pull request #22 from stuarthannig/master

Refactored and fixed some bugs