Remove export_all from wm_common module
Refactor some env helper functions