Refactor function initializer into the functiontable class