Refactor to allow for plain text loading and for handling utf8