Changed list-like usage of some tables to set-like

First time lua user, might not be 100% correct, but should help scaling/performance, etc.