Fix #7: add preview button and handlers