moving EMD aux classes to main class