Implement dry run and fixup bugs.