Added cudaFree and debugging code
Added arch flag to allow for printfs in device funtions