Added SCF algorithm and tests.