Add functions for setting and clean codes.