Cleaning up gtcheck.R