Slow go resizer, which is easier to port to different OSes
Cleanup