Added URL parser function to server.js