Removed extra code from sleep parameter calculation