reworked accessory var clearing and database clearing.