Reduced variable usage in .begin

Removed two unneeded for loops. Also re-arranged pin setup so that we
set the pin's state before we set the pinMode.