Add context managers + unit test