Reverted codes back to clean state before gallery edits