Refactored table relationships