Added published flag, added not yet very good previewing functionality