Refactoring the settings module

Moving the settings to a directory for a cleaner separation, and allow split the settings in submodules.