Migrated schema building to Q