Made Many of the settings optional, commented code