Separate js init function and js init version into two fields