remove debug pins used for activating test lights.
add comments
add missing pin initialization and remove unused variable