Wrote models and migrations