Check page_theme.php and improve theme name/description handling

Supersedes #1196 and #1281