minor bug fixes and cleanup but not fixed yet

Apparently (a^+ b^+ aa) is not invariant with phase factors to the orbitals. Alas I need more time