Boolean  code cleanup

Cleaned up some boolean assignments which could be shortened up from 8 lines to 1, and 8 to 2, respectively.