Use IPython.display.display_html as suggested by @andreabedini
Don't use tornado template class directly, as suggested by @andreabedini
PEP8 fixes