Hier losses refactoring