Use boolean values instead of numbers
Code cleanup