fixup -r, add -T, minor improvements in -g