Data model refactoring (fixed compilation issues)