starting to add the actual preview functionality, also merging the settings object into the data object