added header file for database.c and removed extern declarations