simplify this a bit and remove unnecessary code duplication
remove a utility function that was never actually needed
found a small bug in the code to remove escapes while fixing jshint errors
jshint cleanup of the existing converted tests
jshint cleanup of lib/*.js