Changed OS check to a case statement.