Fix js/#35
Some work on js/#20