Getting rid of the global SQL instance means I also no longer need to use a custom init setup that runs after the configuration file has loaded, since the only two custom init functions left are for parsing the page templates, which does not rely on the configuration file. Therefore, the custom init setup has been removed and the remaining custom init functions are now regular init functions.
Categories without any entries were not showing up on the front page. Fixed.