Add, update and fix GPU code