local database new and improved

As in, it actually works now!