Cleaned up code and added exports for envsubst.