Code cleaned. Still bugs in preview with selected_tags.