Refactored Promises usage
Added error propagation of submit's xhr
Implemented rethrow
Changed when API to take array of promises instead of multiple arguments