Add some JSDocs. Based on #79.