One more cycle of the FSM framework refactoring, making the states more isolated and self contained

Signed-off-by: MHesham <mhesham.fcis@gmail.com>