database works now

database, ui and other changes