Added handling of different types of functions in classesAndMethodsByStructure