some structural changes, pmm update

Added clarity in several places, and added functionality for pmm
choosing over several neighbors.