Device refactor.

 Getting rid of the machine_config class, and adding all that functionality under device.