Updated migration_done to accept direction (up/down). And Bit of code formating