Refact code.