Monadic encapsulation of effects: a revised approach (extended version)