Added sensor checks. Tweaked constants