Refactored function names to match what it actually does
Fixed broken test due to refactoring
Return an empty object when the stateChange function is called