Bug fixes. Mem leaks plugged. First Unit Tests for the more fragile code.