added db validation and added some ui actions/fixes