Making parser a module, making result encodable, fixing parsing issues