database and settings improvements