cleanup and media library tweaks