Fixed a bug in how i1 and i2 are calculated from from lonvec.
Added utils subpackage