Rewrote printheaders function to be smaller. Delete has a bug.