Added angular UI state machine