corrected watch for nodemon and refactored in pieces the two parts.