Added while_gettingready function.  Tweaks to sleeping state.