Added edit method

and clean up parser