Add OS type inference
Merge 'master'