Add groovy support. Factorized Javascript modes