More changes to functions in input.rb and testparse.rb