Added missing methods and fixed JS constructor wrapping.