Code polishing: refefernce pointers, removing default constructors and destructors