#13 has some nice work, but it now conflicts with other changes. It would be good to merge the changes after resolving the small issues that remain.