Added sleep method and class which will use it at some point.