A few minor tweaks and added a linear recursive version of same-parity