Refactored migrations and seeds

Refactored to make everything a transaction.