phi/theta efficiency

made phi/theta switching more time efficient.  Requires us to maintain
three additional vectors though.