Update tests to new expected output from calculate_necessary_state_changes.
Delete some no longer necessary code.
Update calculate_necessary_state_changes to new logic.