Fix compilation/interpretation issues with js including some index lookup porting. Added test html file.