Generate library migrations

Also cleaned up other migrations