New: comments, standardization

-Commented a big chunk of yesterday's work
-Standardized rename/remove to take pageName as sole parameters
-A little bit of other cleanup
Fixed: a giant set of bugs that actually took this long to fix

-Page indices are now refreshed and always labelled correctly
-When closing a tab, jumps to the next tab to the right, or to the left if this tab is the rightmost
-If no tabs remain, a new "untitled" is created
-There is now a "new-tab" div that should never be seen but exists solely to resolve a bug where it was assumed to have a corresponding div

New features, the incorporation of which unearthed the bugs:
-New manual add page button
-Adding multiple new pages will create different page titles (untitled, untitled2, etc.)

Also optimized some code, removed some unnecessary parameters