Removed dead code from Application and updated the on mouse up / move document scope event handlers to delegate these events to the tree view when appropriate, saving us from introducing two new global event handlers for the tree's use.
Upgraded the automatic layout logic to act smarter reg. complex vertical packing scanarios.