cleaned a bit, refactorized a bit, dont have to pass in the gpuindex when you construct