refactor: refactor module environment