Major rehaul to fix build-table