Added new script to write out ambiguous labels
Extracted constants
optimised imports
logging added