Fixed deprated assignment by reference

Deprecated:  Assigning the return value of new by reference is
deprecated
Merge pull request #5 from bfintal/deprecated_assign_by_ref

Fixed deprecated assignment by reference.