Initial pass at device abstraction

This should go before #118 
Same as above.