hfp: Refactorize UI as synchronous