Minor code rearraging
Updated/Fixed the passcodeWasEntered mechanism