Styled Media Library as a pop-up; cleaned up code