In Penknife: Respected linearity of all arguments to JavaScript-implemented functions. Fixed code that tried to call isLinear() as a global function instead of a method. Tweaked a few variable names. Moved some local variables ahead of sanity checks if they would make the sanity checks more readable.