Fix css bugs, csv and pdf bugs and add dynamic css classes