Final adaptation to Uint64 so that everything works in Javascript