Add missing change_pin method and cleaned not used codes.