I made an attempt at this in the latest commit, can you take a look?