Fixed migration and added some other stuff