Better initialization of container dimensions

Addressing pull request #1.

@gabrielflorit +1/-1?