Made some changes to parsing code.