Added javadoc for Media Parameters.
Code refactoring. Added test.