Added functions to functions.php, fixed bug in prehash.php