Code cleanup and added tooltip emails