Start of JSManaged conversions

As described on the mailing list. All tests pass.