merged javascript. introduced new main template system