Updated files with database integration