Ensure all values in env can be Marshaled

Closes #47
Closes #48