hfa: refactoring.