Add tests into main. Some small fixes in Core module.