Wizard flag toggles added

Fixed compiler complaints on newlines at EOF
Refactored some wizard functions into its own file