Add index, header and footer to db