[C_HAT] - Refactor code.