Implement better backend preview mode; better handling of rewrite and alias