Registry loading refactored.