Core subsystems refactorings and bugfixes

Fixed engine destruction process
Added message to stop engine's main loop