Added comments. Reinstated further recursive scan capabilities.