Added Relationships, and I think it simplified the code a lot.