Added tooltips to preferences dialog. Cleaned out some code