b0e58312e3
clean up the code and add more debugging steps for easier troubleshooting when someone reports issues Easy to view diff: <https://www.diffchecker.com/3iJ9lVzH>