UC-138 Code review updates

* Added unit test
* Added integration test
* more constants
* less globals