Add preview tab
Fix css
Bind preview functionality to tab
Fix dialog expanding problem