fixed several warnings, thanks to sparkprime added comments patch for linear math, thanks to Tully Foote