Added support for settings + returning XHR object