Removing unused namespaces, fixing serialization bug related to BaseMediaContext