Fix theme selection issue, reduce duplication of calls and update maintenance.php to V3.
Merge pull request #74 from gjb2048/master

Fix theme selection issue, reduce duplication of calls and update maintenance.php to V3.