Refactoring/schemafix