replace tables with models

local scripts are evil little things.