Refactor call home module