Fixed memory leak and test def

Fixed a small memory leak. Put asserts into ifdef braquets
Removed gTest from the repository

Removed the test library from the repository.