Re-write container tests
More tests. Code refactoring