Initial work on settings API, #776