Added preview button and scale function