[hearthstone] - Refactor code.