styling changes for preview box and fixed a rather large regex mistake