Added getMediaRefByUrl(). Made findMediaByRef() public and static.