Put prints in the neighborhood example inner function, fix bugs