Fix packaging and add js namespace variable