removed intermediate tally from mapper
added comments
converted to ints
reorg tests