Remove the confusion around suggestedState

The code has been refactored so that it is clear how exactly a state is
applied. Earlier the state was being passed around and the decision of which
state was returned was not clear.

Tests were modified as appropriate.

Change-Id: Ifb3d339affcc206d1358119defd4b7400e247f8b
Signed-off-by: Moiz Raja <moraja@cisco.com>