Started work on #62 and #61, but blocked by #68.