changed to generic views and set attributes to media class
added generic views and set attributes for media class.