Use strcpy instead of memcpy.
Cleaned up code.