NC/VRT code cleaned up a bit