tg-extract-results: More cleanup, bug fixes