Made the parsing more rigorous