Moved extra functions to utilities.inc.php