Added psgi file and extended database.pl