Added many functions and methods to the javascript engine.