Experimental revert

Did experiments based on new JS API. Yet to code fully reverting to old
template