context: move some initialization to js
context: remove whitespace