Added some functionality and cosmetics, fixed a few bugs. Double now works with lm2m2_npart.