Rework the classes a bit to make MockDevices possible

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Merge pull request #17 from sahlberg/test-mock

Rework the classes a bit to make MockDevices possible