Refactored and tested File Domain.