Reworked the parsing framework