Extract Some main classes tо divide the functionality/ Done initializing

All additional classes are used only in TestMain app. The initial
classes are not changed.