Added JavaScript manager.

This class handles the more complicated C++-JavaScript interaction.