Added utility funcs, unified env var handling.

Note big change in tokenizer - now returns empty string by default, including after last token. Therefore no. of returned strings in [1,inf]. Will not halt on non-terminated string!