Move imports to header
Normalize style
Refactor for nicer indentation
Rename variable to avoid conflation with global
Remove unused import
Remove long-disabled functionality 'check_conflicts'.