tapsql: cleanup