added external libraries for tests. added debug flags