Correct the way locate options are created, fixes #24
Remove debug code