Fixes in hardware provider.
Tests.
Tests.
Tests.
Moar tests, and a few fixes.