Now the parser will not run if the scanner errors. Also added better error handling to the scanner.