sqlite complete overhaul