Added reduce to stdlib
Added sum/avg to test