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.
`exec/match` the regex before the if statement and test the return value of that instead of using `regex.test`.