Moved neighbor function pointer into rule struct