Fix schema and move settings