now it compiles, (but should not work), replaced . by -> in many places, moved some structure to another file, added a lot of pre-declaration and worked with the include order. May not be perfect and compiling by miracle, but still. Must be simplified, and DO NOT TOUCH INCLUDE order without knowing what you're doing. Ah, moved tree declaration and functions to tree.h/c