Reduce complexity of create_table method