Refactored to better test custom OTA installations.