Remove some redundant var declarations, unused variable.
Remove bit_setters in favor of 1 shl x syntax.