Initial pass at device abstraction

This should go before #118 
I am not seeing anything but good call.