general styling and preview functionality