Bugfix: Ensure correct remove behaviour during a resize operation
Improved efficiency of resize operation. Clean up of put function.