Refactoring out unused files and adding to the Write path