added a few comments and some sample code to access the database in HTMLgenerator