Leak Debugging Unit Tests

Finally got the unit tests working, several of them implemented.