Minor code cleanup

I simplified a few if statements and ran `go fmt` on the files that I modified. 
Sure :) I will clean it up and submit it again. Thanks for the patience