Small fixes in functions.php and better documentation