Moved most of the promise handling into the view class; cleaned up Router class