use OUTPUT instead of raw value for readability
use digitalPinHasPWM() instead of hardwire pin names
cleanups matthijs suggested