added sorting to media library, and hopefully insert into collections