moved tooltip logic to separate file
cached array length in for loop initialization
renamed variable reference for 'this'