Refactored nested associations so they are more readable. Added comments
which make it clearer about what's going on.