cleanup unused table, fix tests