Some if statements would read better.