Added parser tree- flattening function and find intersect functions for sphere and cube