Added speedup code on unix systems
Removed bug that would result in excessive calculations
Added different linkages