fixed algorithm generating p,q,a
Did some doc work
And we have a window