Refactored user defined settings into a separate file, & some small improvments