Adds device sleep on remove.
Changes memory allocation to atomic in the middle of the command.
initial rng support