moved all educator matrix JS code into matrix plugin