Cleanup and proper reverting

Reverting now works better
After three completed cycles without success all is cleared