First round of bugfixes.
ComponentsDialog pretty much working now.