Added motion profile state machine.