Add neighborhood and main script

If that is the case they can pass around neighborhood as an arg, or you can create a function that returns that variable. You can even use a closure to avoid loading the image multiple times.