Merge pull request #1025 from rustyswayne/Refactor/M-502

Starts building out javascript unit tests.