Updating the interface to new scheme used in the trng.
Work on the interface including api.