clean up some gpu code, almost done!