Turned into a module. Split up file and string functions. Use safe env.