Refactor to properly get the resource, and read the file into a string.
Remove unneeded functions.