clean whc code