refactoring only
 again just refactoring, split spagetti code
minor
preview variable value in tooltip