New function getTableNames() and new tests