Cleaned up formatting and simplified some comparisons.