Use factory method to create Os objects from name

This gets rid of the explicit listing of Os classes when creating a new Os object.