Refactors code for adding HA repos.
Merge pull request #157 from dguitarbite/ha_fix

Refactors code for adding HA repos.