Support resizing
Performance optimizations