made almost all reduceing functions part of aaSystem
changed tests in mymain.