Refacter code.