True/False Bug Removed

Bug affected True/False variables has been fixed. Other code has been
refactored to be easier to read.