Handle double-click on label
Cosmetic changes
Extract test function