Hi Josh

To help people follow the algebra, it might be useful to point out that you used the identity:

and then later:

Also, I think it makes the algebra much simpler, if, right from the start, you let:

which gives:

and then do the algebra using the above identities, and substitute for q at the end.