UPD fixing some indenting errors
UPD adding code to trigger after response event
UPD refactoring important steps out of dispatch into their own private methods, all tests still passing