Leak Debugging Unit Tests

Implemented more tests, debugged library, merged library and unit tests
into one project.