Add production configuration, fix some bugs found during migration testing