Changed parser to use string iterators instead of pointers and added comments