added input validation to DefIntegrate Function
Merge branch 'master' of https://github.com/deaddog/sw505-code