Database changes, adding gets/puts to functions