Database interface now working