JS: refactored numTags into numLinks, SERVER: added error messages to perror()