Restructure if statement.