added tern, added some lines to support go plugins