Some changes in Main Activity, started refactoring.

Add twoPane mode preference in settings;