Start moving functions from switch to table