Refactoring of container for #65, fixed tests