Refact the code.