Added a ParseException class and some comments to the code.