General refactor and code cleanup
Refactored internal references to dependencies and adding unit testing. Added ability to disable inactivity timeout by setting timeout to -1.
Refactored internal references to dependencies and adding unit testing. Added ability to disable inactivity timeout by setting timeout to -1.