Delete method createTable and refact code