Settings.py code cleanup

Change-Id: I2c4438958a9e7ac6ad65d4d3e95b1878fbfe654b