Add `container` option

+ some refactoring