Modularized the parsing