Smarter index html renderin and pdf merging added