Code cleanup walkthrough with @gvsboy
Removes a bunch of dead code, adds comments where needed, and documents
functions that were missing documentation