Added tern. Removed unused package code for now.
Removed whitespace check and unusued code.
Running flycheck and tern on demand in JS2 atm.