separated script from html to own file.
reduced global variables.
extracted tooltip creation function
new more detailed tooltips