Refactor makeApiRequest and implement guest order

Guest order might still have a few bugs because I am still testing it, but I don't want to hold anyone else back so I am pushing the refactored code now to avoid future merge conflicts.