Take out unnecessary if statements