Add javascript wrapper so it can be loaded directly