Extended refactor for OS types