Removes unnecessary switch statement.