added more notes in the comments
removed old commented out regexes
changed indexof to search to properly handle cases of quote marks vs no quote marks