Nimisha/refactor mixed context managers