Added a preview and handled exceptions.

Quickly and dirty.