Changed if conventions to be consistent.