Core library refactoring. Step 1.

Signed-off-by: Dmitry Drozdov <dmitriydrozdov0071@gmail.com>
Core library refactoring. Step 2

Signed-off-by: Dmitry Drozdov <dmitriydrozdov0071@gmail.com>