Refactoring schema