Fix tb, and cleanup