Extracted resume code into new method.
Added exposed methods to allow triggering of idle or resume manually.