Regex performance improvement.
Moved main function  def checks to trans phase.
Fixed changed error codes.
Another undeclared parameter.