Fixed most bugs
Polished; will now commit the data unless run with --dry-run