Fix Resize Tool

This PR adds a properly working resize tool to replace the incomplete/broken version in the current codebase.

Includes tests of key computations and a demo.