Move out device specific code into a new source file.