Improved linker
More changes, to reduce difference between this, and my integrated version