Clean call to settings.js
Restore sleep consistency and handle null data