Merge "Refactor hal loading"