refactored media library UI to MVVM