Unit Testing, some bug fixes and refactoring

Okay, so we were doing some integrations and found a bug with nested _add calls losing their scopes. 

Decided to add some testing capabilities to help ensure code is working and catch any future regressions. It's a start, but obviously not complete. We tested as far as we needed to meet our case. Many overly simplistic tests in places as well.

Running JSHint found some potential areas for issues in code readability, editabilty, etc. Mostly some Short syntax conditional assignments and missing ";"'s. Nothing major, but you will see those changes in this pull request.

Also moved some module private functions into their defined objects to allow testing. 

Everything is run through grunt and buster. 

If this pull is accepted, we can add some badging to the README to show the travis-ci status and package status.