Add global S settings object, beef up comments