sum(LogicalVector that contains NA) -> NA. modified the code so that it just counts the 1s. closes #76
some code reorg, trimming of unused