Improve media loading and sort