JavaScript mode framework.Work everything with modes!