adding onComplete to execute functions @ end of XHR

Added a way to add functions to be executed at the end of the first XHR (should make it the last one tho).
After the first run, every function added is executed immediately