Clean up functions.php and add some nice features to extras.php