Fix lint errors
Fix lint errors

* some refactor to avoid using a lambda

pearsontechnology/st2contrib,armab/st2contrib,StackStorm/st2contrib,pidah/st2contrib,StackStorm/st2contrib,pearsontechnology/st2contrib,tonybaloney/st2contrib,pidah/st2contrib,pearsontechnology/st2contrib,pidah/st2contrib,armab/st2contrib,StackStorm/st2contrib,armab/st2contrib,pearsontechnology/st2contrib,tonybaloney/st2contrib,tonybaloney/st2contrib