Integrate previewer and fix broken tests