Major refactoring. Then added NormalMode.