Refactoring FileInfo into type hierarchies