add tooltips and some refactoring