Resize can be replaced with constructor, more elegant.