Update JS gen to use canonicals & be nicer/faster
Filter unused modules

Possibly sets things up for warnings on unused imports