Realization of Composite Design Pattern; fixed #3; added some new minor functionality