Minor additions and optimizations to containers and basic logic.