Nimisha/refactor mixed context managers

I have moved the context managers in mixed to the base classes and overridden by mixed.
This PR is based off of the assets PR.

@dmitchell or @cpennington  please review.