Started working on GPU main loop