Rewrite parser for use mongo as storage