Updated signatures in header
Refactor code to be more like CUDA
Update main to be based on the wiki