Updated the pin modes

A lot of changes