Gpu Setup Refactoring