Revert "Revert "initialize mContext -- fix""

This reverts commit bd88157895478274babd8ea24b402a591c69f018.
Revert "Revert "start fixing build errors""

This reverts commit ffb3999fa45219a0fa55d78790ee4bdf8bd9ff6e.