Added sleep(), wake() and destroy().