#46 some work on the Javascript side; still lots of things to do