Refactor passcode