Separate the main modes from the anothers.
code refactoring.