Changed the architecture for parsing and also updated tests