Move prepareTable to correct class