Fixed named scopes for relations. For #37
Restructured include logic to join tables in order they were provided. For #37