tweak logic in processQueue to be a bit more straight forward
simplify processQueue logic further and pull out some helpers for clarity
pull out string parse and note error case I don't want to solve right now