Adding improvements (preview, resizing) and bugfixes