nTox cleanups

nTox was using strcpy in new_lines, which was vulnerable to overwriting the lines buffer if a line was greater than STRING_LENGTH characters long. Changed that to strncpy, and wrote a get_id() function, as the same procedure was repeated twice in the file.