Add basic structure for handling different devices.

This is my first time writing anything serious in Go so this probably
looks like something that came out of the backside of a cow.