get logic for sanity checks of cgi_get_vars right
style, sorting for lists of documents
remove redundant (shared) code
cosmetics
work on pp content: download area, teaching