WIP: Refactoring SETUP table logic