Update to v3.1.1, add js modules separately, add update script