Fixed some reference errors and rendering in the media class