Clean up version hash
Die if invalid reference
Factor out command line generation
Line length
Die if invalid methratio version