Cleaning up fileio

WIP: Adding env functions

WIP: Adding more string utils.