edits and comments

:warning: DO NOT MERGE :warning:

I've made some edits and added some inline comments. Best to use the edits/ comments as guidance rather than necessarily usable code, since you two are much more familiar with your project scope and intentions than I am. The code I changed wasn't tested, so no guarantees that it works as written, but hopefully it can be helpful as you continue to work on the project going forward.