Improved Hopper script