Re-add accidentally deleted db.php.sample, with comments
Tidy questionnaire markup slightly
Add doxygen configs
Split lib, and comment code a bit