Alot of code generalization and refactoring.
Now have factories for nodes and functions.
Currently Tfunc is not working.
Seems like function values cannot be generic as they are monomorphic.
Looking for a workaround.
Tfunc and functions has been seperated to its own files.
Tfunc must be generic, I have commented out my failed attempts.
Sorry for the terrible commit messages as me if you need info on
something....