Refactoring schema to define order of factors
Still refactoring schema
Fixing tests for refactored schema