Added handling of "fx:reference" elements, improved pane handling.