hud refactoring