Added various todo.jsm features

how do i javascript.  
Some things may not be coded well, but I guess I haven't seen `calc.jsm` yet.
I can see how you were got that impression. Indeed, that used to be the convention in the codebase. I still haven't gotten around to fixing it all up though.