Added compositeImage and fixed clone method