Move GPU code to header file
Fix file naming problems