Test of preview

 * Reorg of code to make flow control more clear
 ! A callback is currently not being called