Get rid of multiple if statements.