Refactored relational: edits as per @asmeurer's suggestions.