Clean up scanner (again) and add translation to parser