Changed strcopy to strncpy to more accurately mirror C std lib.