Store Ka values instead of recalculating them.
Add addition for tuples.
Minor cleanup.