Added recursive add/remove. Imporoved tests and test coverage. Some refactorings.