Functional version of m2tool using komandr project