Change internals of the EC library so that the functions