refactor

#### done
* extract lambda stuff in module
* extract sqs stuff in module
* update tests
For your private functions you sometimes use function expressions (var funcName = function() {}) and other times you use function declaration (function funcName() {}). Wouldn't be better if it was all uniform?