Who is organizing the heartbeat and its roles in the body?
The Sinoatrial Node is a ganglion (clump of nerves) attached to the heart, which regulates heartbeat independently from the brain (http://en.wikipedia.org/wiki/Sinoatrial_node).

Heart rate can also be influenced by hormonal responses produced by the autonomic nervous system. To quote Wikipedia:


  While heart rhythm is regulated entirely by the sinoatrial node under
  normal conditions, heart rate is regulated by sympathetic and
  parasympathetic input to the sinoatrial node. The accelerans nerve
  provides sympathetic input to the heart by releasing norepinephrine
  onto the cells of the sinoatrial node, and the vagus nerve provides
  parasympathetic input to the heart by releasing acetylcholine onto
  sinoatrial node cells.


Source: en.wikipedia.org/wiki/Heart_rate#Physiology