What structure regulates the direction of blood flow through the heart?