[WIP] Reductions and Neighborhoods

This implements more general reductions, and neighborhood reductions.