More work on the ForeignKey functionality