Refactored Settings + minor structural changes