Add groovy support. Factorized Javascript modes

has the name of the commit said. ^^