Known bugs:
-----------

* Eliminate mem-leaks (see the FIXME).

* Clean up the code (there are plenty of #if 0's and stuff)

* Fix or remove the various FIXME's (if necessary - seems to be OK without it) 

* Fix the preview behaviour on a layer with an alpha channel.

* The preview area should be resized when the dialog is.

See TODO for missing features

