Add settings, various other fixes