Revised parsing routine.