HUD refactoring