js client templates improved