Added print unification
reordered functions
misc to be verified