Inlined more math routines.  Changed shape of jacmi to match jacm1.

This is part of an ongoing effort to address #5.