Minor refactoring on containers