Refact codes.