Removed left-recursive defitinitions for now (figure out how memoize works)