Cleaning up RecursiveTreeIterator class

Nothing about functionality, only coding style details.

- Cleaning up the code
- Making it PSR1/2 compatible