Fix mapped buffer

Use new `Environment` for the access to the `Factory` singleton.