Add database partially implemented. Structure redone.

Needs to keep track of what user was using application before entering
database keys because I need to switch database from PDC database to
user’s database.