Added testcase for recursive submodule processing

- Added method to add submodule to repository
- Some refactoring
- Testcase for recursive submodule processing