fix how sleep is monitored
change sleep and wake cycles
identation changes
minor in and