made all ecc functions public
remove debug print
changed syntax for pairs to make sum type come first.