Add partial implementation of #3.