Fixed typo now that device is no longer gpu
Pulled common code into module for devices
Fixed gpu lib typos