Modified clone constructor to work with private variables