Container refactoring

Reduce method sizes.