updated how we do routing--moved the meme-related string logic to a function

this was necessary to 1) get the query string, and 2) makes handling special characters WAY easier