Add lib.base environment functions