Changed parsing algorithm to use new ParseElements