Bugs in Database-test fixed. Many comments added. Some variables and
methods renamed.