added sorting of variables by Pt, Tools class, EM-ME flag in Looper