Atma.js: update and refactor (closes GH-816)
Merge pull request #1009 from tenbits/atmajs-update

Atma.js: update and refactor (closes GH-816)