Database update and header cleanup