Added settings page
refactored some code
ui state
Merge remote-tracking branch 'origin/master'