Automated the generation of the menu, changed both content and menu to a single loop, moved function, moved content array out of index.php