Tracking and Merging love

This contains a rewrite of #294 and a fix for #276