extract constants and trivial functions to create "helper.py"
reduce .ann files to .ann.reduced based on references

Two records are reduced to one if their references are exactly the same