More code improvements.

Fix error in copy constructor argument and add #ifdef flags.