Added Unit tests to the CoreTest
Security improvements