Preview cleanup, open/close metadata working