Move imbalance calculation into separate function.

Created by  Robert Vollmert  on October 13, 2009
QY27OCPL2PEW4TRTMKEOK2IJRQFUQX2A2YF2FHEFI52EE7WU43CQC
In channels
main
Change contents