Made the data preview buttons functional. Still need to add actual preview.