Modularized and consolidated code.  Most data access functions are now broken out into utils.php.