various precalculus github issue fixes, #500, #499, #498, #497, #496, #495, #494, #482, #444, #419, #417, #216