CLeaned migrator and fixed tests