Finish initial JS implementation