many bugs fixed, added documentation, sped up NA_integer_ conversion