Putting program to work again with new DB structure