parseFileIntoModel function

Parse the contents of a file into a model