Add support for exiting formspecs by doubleclicking outside

Formspec performance fixes
Some code cleanup