Add state machine and machinery for org-mode babel