Fixed many register settings

Mostly small fixes, nothing too major implemented. Mostly the data
direction registers needed to be modified. I forgot that I had enabled
internal pull-ups on some pins but they aren't needed as I'm using real
pull-up resistors now.