Moved all the file data functions to its own class