Moved all relevant functions to gfon.h
Again on leech build algorithms
Little fixes on leechbuild