Finished sphinx support
Implemented master balancing.
Fixed test brak.