Code refactoring in HWT.