Add asum, code cleanup

Details:

- Add asum function and update tests
- Clean up some code and suppress unneeded warnings