Minor refactorings
Minor refactorings
added recursive support