Fixed bug in table logic, almost working properly. Just need to set the upgrades correctly.