Incorporated up to and including r97 from source

More work to do, need to RDL the crypto stuff and add r98.