Lots of changes, it's starting to become some approximation of useful.  Still needs significant refactoring of the logic to be general.