Use JS.fromList and JS.toList when appropriate