Modified clone() and mixin() methods to bind any functions to the new object