Consolidated some code. Adjusted layout of main settings screen.