Some refactoring to support custom icon at the top of the passcode screen.