fixed PHP 5.3 compatibility issues
sleeping formula refactored
Merge remote-tracking branch 'origin/master'