Updated the parsing code using a better 'ReplayableGenerator' class. Also, the parsing code has been better structured. In addition, much better error messages are now provided.