reimplemeted flattener, separating into disamgiuator and simple flattener meaning that in the pipeline there is now an intermediate unambiguous annotation tree where the node structure resembles the function application structure and the types and denotations are known