Fixed the bootstrapping of the JS backend + better handling of type constructors