Merge pull request #542 from leider/master

preview functionality simplified and clearer (+some more small changes)