Reorganized parsing code and first time parsing