factory/view up to 95%
Device unit tests 100%
Merge pull request #245 from shermdog/unit-tests

Unit tests up to 99% (14 lines missing)