Refactor calls to createObserver