Add media type is now working.  Some additional code clean up as well.