DEV: Add support for passing environment dict.