Copy Freak source code to begin to make adjustments for GPU algorithm