Fix up the new nearest matching algorithm and integrate it with the lap_manager (covered with more unit tests and pushed the old code out to a similar module). Also improved the comments for the main program loop.