Added more tests and fixed node removal

* Added unit tests for skip, break and removal options.
* Fixed bugs in node removal accordingly.