Minor edits for readability

Changed 1 to True in conditional
data to data!=0 in conditional