new util spec. also changed some regexes to simpler .end_with? statements.