refactored preview content type handling