Cleaned up media implementation.