Optimize isAgg test
Use a template in aggResult (more esay to maintain)
Merge pull request #67 from ErwanPigneul/master

Some optimizations