Less repeat computation, cleanup code, comment it

Got the idea for restructuring the conditional inside (term x) from
answer in the Scheme wiki... very nice. Also computing n-even once
should(?) reduce the redundancy of computation.